1. Field of the Invention
The present invention relates to a numerical controller and more particularly to a numerical controller that executes operation by table-format data.
2. Description of the Related Art
As a method of controlling drive of each control axis individually in synchronization with operation of a reference axis, an operation function with table-format data is well-known by which position information for the control axes is stored in association with a reference axis position in the table-format data provided in a memory or the like and each control axis is operated synchronously with the reference axis based on the information stored in the table-format data.
The table-format data in which an axis position or auxiliary function such as an M code, corresponding to time, an axis position, a spindle position is set, is stored in the memory or a storage device connected with a network, and each axis and the auxiliary function are controlled while the table-format data is read sequentially.
As an example of a prior art technique that proposes such a function, a technique is known by which a position of a movable axis for each time point or each rotation angle is stored as numerical control data, the time points or the rotation angles are monitored, and the numerical control data associated with the movable axis is output each time any of the stored time points or rotation angles is reached (for example, see Japanese Patent Application Laid-Open No. 59-177604).
In addition, an invention is also known by which a data table in which commanded positions of an X axis and a Z axis with respect to a reference position are stored is provided, the reference position is obtained by applying an override value to a value of a counter that counts reference pulses, and the commanded positions of the X axis and the Z axis stored in the data table are output based on the obtained reference position to synchronously control the X axis and the Z axis, thereby enabling an override to be applied even when the drive of axes are controlled by the data stored in the data table, and further, enabling commanded positions to be linearly connected, or connected by quadratic function, cubic function, or the like, and also enabling an auxiliary function to be commanded (for example, see Japanese Patent Application Laid-Open No. 2003-303005).
According to the inventions described in Japanese Patent Application Laid-Open No. 59-177604 and Japanese Patent Application Laid-Open No. 2003-303005 above, it is possible to execute free tool operation irrespective of a machining program, achieving shorter machining time and higher machining accuracy.
However, in numerical controllers in a prior art technique, there is a problem in that methods of preprocessing and interpolation in operation by table-format data are different from methods of preprocessing and interpolation in operation by an NC program, there is no means of integrating respective interpolation results, and therefore the operation by the table-format data and the operation by the NC program cannot be executed simultaneously in the same path. In a prior art technique, when the operation by the NC program and the operation by the table-format data are executed, control is performed by switching to the operation by the table-format data with the M code or the like while the operation by the NC program is executed, depending on a machining status or machining details in the path, as illustrated in FIG. 12.
FIG. 13 is a flowchart illustrating processing by a numerical controller executing such operation switching (operation switching execution processing).
[Step S1301] When the operation switching execution processing is started, whether a program to be currently processed is an NC program or table-format data is first determined. If the program to be currently processed is determined to be an NC program, the flow proceeds to S1302. If the program to be currently processed is determined to be table-format data, the flow proceeds to S1305.
[Step S1302] The NC program as the processing target is read.
[Step S1303] A block as a processing target is retrieved from the NC program and preprocessed.
[Step S1304] A distribution movement amount to be commanded for a movable part of each axis for each distribution period of the block as the processing target is obtained and interpolation processing is performed.
[Step S1305] The table-format data as the processing target is read. The table-format data to be read is preprocessed table-format data.
[Step S1306] Interpolation processing for a control-target axis is performed based on a reference axis position by using the read table-format data and an interpolation result is output.
Thus, in the processing methods in a prior art technique, the operation by the NC program and the operation by the table-format data cannot be executed simultaneously. Therefore, the operation is executed by switching between the operation by the table-format data and the operation by the NC program, depending on the machining status or the machining details in the path, and a specific axis cannot be exclusively controlled according to actual time by the table-format data during the operation by the NC program.
In addition, in the operation by the table-format data in a prior art technique, there is no means of referring to an interpolation result for an axis controlled by the NC program, and the axis controlled by the NC program cannot be specified as a reference axis to be used in the table-format data. Accordingly, there is no means of achieving synchronization between an axis controlled by the table-format data and an axis controlled by the NC program and it is not possible to enable an operation of the axis controlled by the table-format data to follow an operation of the axis controlled by the NC program.